﻿<%@ Page Title="Title" Language="C#" Inherits="System.Web.Mvc.ViewPage<List<GradeBook.Models.Group>>"
    MasterPageFile="~/Views/Shared/Site.Master" %>

<%@ Import Namespace="GradeBook.Models" %>
<asp:Content runat="server" ID="Title" ContentPlaceHolderID="TitleContent">
    Страница преподавателя
</asp:Content>
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">
    Список доступных групп
    <table>
        <thead>
            <tr>
                <th>
                    Id
                </th>
                <th>
                    Название
                </th>
                <th>
                    Описание
                </th>
                <th>
                    Операции
                </th>
            </tr>
        </thead>
        <tbody>
            <% if (Model != null)
                   foreach (GradeBook.Models.Group group in Model)
                   { %>
            <tr>
                <td>
                    <%= Html.Encode(group.Id)%>
                </td>
                <td>
                    <%= Html.Encode(group.Name)%>
                </td>
                <td>
                    <%= Html.Encode(group.Description)%>
                </td>
                <td>
                    <%= Html.ActionLink("Список студентов", "Group", "Tutor", new { groupId = group.Id }, null)%>
                </td>
            </tr>
            <% } %>
        </tbody>
    </table>
</asp:Content>
